const Personal = require("../model/personal");
module.exports = {
    /**
     * 获取登陆用户个人日记
     */
  getPersinal: (req, res, next) => {
      // 登陆后获取指定用户个人文章
    let { id } = req.session.user[0];
    Personal.getPersinal(id)
      .then((res) => {
        req.persinalList = res;
        next();
      })
      .catch((err) => {
        next(err);
      });
  },
  
};
